{% stylesheet %}
.block_blog_list {
  display: flex;
}

@media screen and (max-width: 767px) {
  .block_blog_list {
    flex-direction: column;
  }
}

.block_blog_list .block_blog-left {
  padding: 0 15px 0 0;
  box-sizing: border-box;
  width: calc(100 / 12 * 4 * 100%);
}

@media screen and (max-width: 767px) {
  .block_blog_list .block_blog-left {
    width: 100%;
    padding: 0;
    margin-bottom: 15px;
  }
}

.block_blog_list .block_blog-right {
  padding: 0 0 0 15px;
  box-sizing: border-box;
  width: calc(100 / 12 * 8 * 100%);
}

@media screen and (max-width: 767px) {
  .block_blog_list .block_blog-right {
    padding: 0;
    width: 100%;
  }
}

.block_blog_list .bolg-content {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background-color: var(--bg-color);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.block_blog_list .bolg-content > label {
  color: var(--label-color);
}

.block_blog_list .bolg-content > h2 {
  color: var(--title-color);
}

.block_blog_list .bolg-content > p {
  color: var(--subtitle-color);
  letter-spacing: 1px;
}

.block_blog_list .bolg-content .blog-content-btn {
  align-self: flex-start;
  font-size: 12px;
  padding: 12px 18px;
  color: var(--btn-color);
  border: 2px solid var(--btn-color);
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.block_blog_list .bolg-content .blog-content-btn svg {
  width: 12px;
  height: 12px;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.26s ease-in-out;
}

.block_blog_list .bolg-content .blog-content-btn svg path {
  fill: var(--btn-color);
}

.block_blog_list .bolg-content .blog-content-btn span {
  transition: all 0.26s ease-in-out;
}

.block_blog_list .bolg-content .blog-content-btn:hover svg {
  opacity: 1;
  right: 5px;
}

.block_blog_list .bolg-content .blog-content-btn:hover span {
  transform: translateX(-6px);
}

.block_blog_list .blog-grid {
  display: grid;
  grid-gap: 30px;
  grid-template-columns: repeat(2, auto);
}

@media screen and (max-width: 767px) {
  .block_blog_list .blog-grid {
    grid-template-columns: repeat(1, auto);
    grid-gap: 15px;
    box-sizing: border-box;
  }
}

.block_blog_list .blog-grid .blog-grid-item {
  width: 100%;
  padding-top: 100%;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.block_blog_list .blog-grid .blog-grid-item:hover .blog-grid-item-img {
  transform: scale(1.2);
}

.block_blog_list .blog-grid .blog-grid-item:hover .blog-grid-item-mask {
  opacity: 1;
}

.block_blog_list .blog-grid .blog-grid-item:hover .blog-grid-item-content {
  transform: translateY(0);
}

.block_blog_list .blog-grid .blog-grid-item .blog-grid-item-img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  z-index: 10;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all .45s linear;
}

.block_blog_list .blog-grid .blog-grid-item .blog-grid-item-mask {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 20;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.block_blog_list .blog-grid .blog-grid-item .blog-grid-item-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  top: inherit;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 30px;
  transform: translateY(100%);
  transition: all .45s ease-in-out;
}

.block_blog_list .blog-grid .blog-grid-item .blog-grid-item-label {
  letter-spacing: 2px;
}

.block_blog_list .blog-grid .blog-grid-item .blog-grid-item-label, .block_blog_list .blog-grid .blog-grid-item .blog-grid-item-title {
  color: var(--item-font-color);
}

{% endstylesheet %}
{% assign blockId = block_id | default : section.block_id %}
{% assign defaultEmpty = 'empty.png' | public_asset_abs_url %}


<div class="container-wrapper">
  <div class="block_blog_list" style="--btn-color:{{section.settings.btn_color}};--label-color:{{section.settings.label_color}};--title-color:{{section.settings.title_color}};--subtitle-color:{{section.settings.subtilte_color}};--bg-color:{{section.settings.bg_color}}">
    <div class="block_blog-left animation-init" data-animation="animation-move-left">
      <div class="bolg-content padding-30">
        <label class="font-size-10 padding-bottom-12">{{section.settings.label}}</label>
        <h2 class="general_title-color padding-bottom-24">{{section.settings.title}}</h2>
        <p class="font-size-14 padding-bottom-24">{{section.settings.subtitle}}</p>
        <a class="blog-content-btn" href="{{section.settings.btn_link.url | default:'javascript:;'}}">
          <span>{{section.settings.btn_text}}</span>
          {% include 'icon_goya_back_right' %}
        </a>
      </div>

    </div>
    <div class="block_blog-right">
      <div class="blog-grid">
        {% for block in section.blocks %}
        <a class="blog-grid-item animation-init" href="{{block.link.url | default:'javascript:;'}}"  data-animation="animation-move-right" style="--item-font-color:{{block.font_color}}">
          <img class="blog-grid-item-img" data-src="{{block.imag.src}}" src="{{defaultEmpty}}" alt="{{block.imag.alt}}">
          <div class="blog-grid-item-mask model-hide"></div>
          <div class="blog-grid-item-content model-hide">
            <div class="blog-grid-item-label font-size-12">{{block.label}}</div>
            <div class="blog-grid-item-title font-size-22 padding-top-8">{{block.title}}</div>
          </div>
        </a>
        {% endfor %}
      </div>
    </div>
  </div>
</div>
{% schema %}
{
	"tag": "",
	"class": "block_page_list",
	"is_global": false,
	"icon": "icon-tuwenliebiao",
	"name": {
		"zh_CN": "页面列表"
	},
	"max_blocks": "6",
	"blocks": [
		{
			"name": {
				"zh_CN": "页面"
			},
			"type": "page-item",
			"settings": [
				{
					"type": "card_image",
					"label": {
						"zh_CN": "图片"
					},
					"default": {
						"src": "",
						"alt": ""
					},
					"info": {
						"zh_CN": "建议宽高比例为1:1，宽度800px以上"
					},
					"id": "imag"
				},
				{
					"type": "card_input",
					"label": {
						"zh_CN": "标题"
					},
					"default": "Coat Hanger",
					"id": "title"
				},
				{
					"type": "card_input",
					"label": {
						"zh_CN": "标签"
					},
					"default": "Furniture",
					"id": "label"
				},
				{
					"type": "card_color",
					"label": {
						"zh_CN": "字体颜色"
					},
					"default": "#ffffff",
					"id": "font_color"
				},
				{
					"type": "card_page_link",
					"label": {
						"zh_CN": "跳转链接"
					},
					"default": {
						"type": "",
						"title": "",
						"url": ""
					},
					"id": "link"
				}
			]
		}
	],
	"settings": [
		{
			"type": "card_header",
			"label": {
				"zh_CN": "设置"
			}
		},
		{
			"type": "card_input",
			"label": {
				"zh_CN": "标题"
			},
			"default": "Portfolio",
			"id": "title"
		},
		{
			"type": "card_input",
			"label": {
				"zh_CN": "标签"
			},
			"default": "FEATURED",
			"id": "label"
		},
		{
			"type": "card_textarea",
			"label": {
				"zh_CN": "描述"
			},
			"default": "Pop-up mixtape pinterest succulents raclette everyday carry. Microdosing glossier drinking vinegar.",
			"id": "subtitle"
		},
		{
			"type": "card_input",
			"label": {
				"zh_CN": "按钮文字"
			},
			"default": "All Looks",
			"id": "btn_text"
		},
		{
			"type": "card_color",
			"label": {
				"zh_CN": "按钮颜色"
			},
			"default": "#282828",
			"id": "btn_color"
		},
		{
			"type": "card_page_link",
			"label": {
				"zh_CN": "按钮链接"
			},
			"default": {
				"type": "",
				"title": "",
				"url": ""
			},
			"id": "btn_link"
		},
		{
			"type": "card_color",
			"label": {
				"zh_CN": "标签颜色"
			},
			"default": "#b9a16b",
			"id": "label_color"
		},
		{
			"type": "card_color",
			"label": {
				"zh_CN": "标题颜色"
			},
			"default": "#282828",
			"id": "title_color"
		},
		{
			"type": "card_color",
			"label": {
				"zh_CN": "描述颜色"
			},
			"default": "#686868",
			"id": "subtilte_color"
		},
		{
			"type": "card_color",
			"label": {
				"zh_CN": "背景颜色"
			},
			"default": "#f2f2f2",
			"id": "bg_color"
		}
	],
	"default": {
		"settings": {
			"title": "Portfolio",
			"label": "FEATURED",
			"subtitle": "Pop-up mixtape pinterest succulents raclette everyday carry. Microdosing glossier drinking vinegar.",
			"btn_text": "All Looks",
			"btn_color": "#282828",
			"btn_link": {
				"type": "",
				"title": "",
				"url": ""
			},
			"label_color": "#b9a16b",
			"title_color": "#282828",
			"subtilte_color": "#686868",
			"bg_color": "#f2f2f2"
		},
		"blocks": [
			{
				"imag": {
					"src": "",
					"alt": ""
				},
				"title": "Coat Hanger",
				"label": "Furniture",
				"font_color": "#ffffff",
				"link": {
					"type": "",
					"title": "",
					"url": ""
				},
				"block_type": "page-item"
			},
			{
				"imag": {
					"src": "",
					"alt": ""
				},
				"title": "Coat Hanger",
				"label": "Furniture",
				"font_color": "#ffffff",
				"link": {
					"type": "",
					"title": "",
					"url": ""
				},
				"block_type": "page-item"
			},
			{
				"imag": {
					"src": "",
					"alt": ""
				},
				"title": "Coat Hanger",
				"label": "Furniture",
				"font_color": "#ffffff",
				"link": {
					"type": "",
					"title": "",
					"url": ""
				},
				"block_type": "page-item"
			},
			{
				"imag": {
					"src": "",
					"alt": ""
				},
				"title": "Coat Hanger",
				"label": "Furniture",
				"font_color": "#ffffff",
				"link": {
					"type": "",
					"title": "",
					"url": ""
				},
				"block_type": "page-item"
			}
		]
	}
}
{% endschema %}